import { ChatType } from "./chat";

export enum FilePage {
  owner = 0,
  session = 1,
  group = 2,
}

interface IFileNavList {
  icon: string;
  label: string;
  page: FilePage;
}

interface IFileListRes {
  uuid: string;
  updatedAt: string;
  fileName: string;
  fileSize: number;
  fileUrl: string;
  localPath: string;
}

interface IFileListItem extends IFileListRes {
  downloaded: boolean;
  progress: number;
}

interface IDownloadProgress {
  taskId: string;
  progress: number;
  received: number;
  total: number;
}

interface IDownLoadDone {
  taskId: string;
  fileSavePath: string;
  state: string;
}

interface IFileListProps {
  id: number;
  type: ChatType | null;
}

interface IFileSelectData {
  sessionId: string;
  id: number;
}

export type {
  IFileListRes,
  IFileListItem,
  IFileNavList,
  IDownloadProgress,
  IDownLoadDone,
  IFileListProps,
  IFileSelectData,
};
